home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.19971216-19980424
/
000329_news@newsmaster….columbia.edu _Mon Mar 23 17:53:17 1998.msg
< prev
next >
Wrap
Internet Message Format
|
1998-04-22
|
4KB
Return-Path: <news@newsmaster.cc.columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id RAA27815
for <kermit.misc@watsun.cc.columbia.edu>; Mon, 23 Mar 1998 17:53:17 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id RAA28167
for kermit.misc@watsun; Mon, 23 Mar 1998 17:53:16 -0500 (EST)
Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Help with simple script...
Date: 23 Mar 1998 22:53:15 GMT
Organization: Columbia University
Lines: 78
Message-ID: <6f6p4r$g7o$1@apakabar.cc.columbia.edu>
References: <6f6ncm$oku@panix3.panix.com>
NNTP-Posting-Host: watsun.cc.columbia.edu
Xref: news.columbia.edu comp.protocols.kermit.misc:8527
In article <6f6ncm$oku@panix3.panix.com>,
Greg Vilardi <vilardi@panix.com> wrote:
: Hi everyone. I am having a problem writing a simple kermit script to take a
: flatfile of command records and spit them out to a remote serial device. The
: technical details are as follows: C-Kermit v6.0.192 SCO Unix 3.2v4.2
: connected to a CX DigiBoard. The remote system is on a dedicated line,
: directly connected and standard RS232 connectivity is working fine.
:
Using what kind of flow control?
: I need to have a script that will take each line of a file, and send it out
: the serial port. The script will then wait for a response from the port, and
: log both the command and the response to another file. If some kind person
: out there already has a script that does this or something very similar,
: could you please e-mail it to me? Or could someone who knows more about
: scripting than I do please tell me what is wrong with the script below? I've
: spent most of the weekend with the kermit manuals and have had no luck. I
: tried the FAQ too. Suggestions to RTFM greatfully accepted if page numbers
: are provided. I have read chapters 17, 18 & 19 3 times already.
: ...
: Script starts below:
:
: ; Read file $1 one line at a time and send command to paging terminal on port
: ; $3. Write return messages to $2.
:
: def UPDATE {
: local \%c cmd
: if < \v(argc) 4 end 1 Usage: UPDATE infile outfile device
: ;set take error off
: set carrier-watch off
: OPEN READ \%1
: if fail end 1 Can't open \%1 for reading.
: open write \%2
: if fail end 1 Can't open \%2 for writing.
: set line \%3
: if fail end 1 Cant open port \%3
: set speed 9600
:
C-Kermit defaults to Xon/Xoff flow control. Is that what you want to
use? If so, is the other system set up for it too?
: set input silence 2
: set input timeout-action proceed
: set input echo off
: define \%c 0
: while true {
: read cmd
: xif fail {
: close write
: end 0 Commands processed: \%c.
: }
: increment \%c
: ; writeln debug-log \m(cmd) \m(\%c)
: output \m(cmd) \13\10
: input 10 \10
: xif fail {
: close read
: close write
: end 1 Terminal did not respond.
: }
: writeln file \m(cmd)
: writeln file \v(input)
: }
: }
: log debug debug.log
: update termrecs termrecs.out /dev/ttya01
: close debug
That's a very well-written script, using all the appropriate mechanisms
and using them correctly; nothing stands out as suspect.
So in what way does it not work? What, exactly are the symptoms?
Do any lines get through? Do you ever get a LF back from the terminal?
In other words, is it a basic connectivity problem, or a problem with
the execution of the script?
- Frank